<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">

    <div class="row">
        <div class="col-md-12">

            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs nohref" role="tablist">
                    <li style="min-width: 150px;" ng-class="{'active':'tabInfo' == currentTabId}" ng-click="selectTab('tabInfo')">
                        <a href="javascript:void(0)" role="tab" data-toggle="tab">{{'基本信息' | dyLanguage}}</a>
                    </li>
                    <li style="min-width: 150px;" ng-class="{'active':'tabExercise' == currentTabId}" ng-click="selectTab('tabExercise')">
                        <a href="javascript:void(0)" role="tab" data-toggle="tab">{{'科目信息' | dyLanguage}}</a>
                    </li>
                </ul>
                <div class="panel-body tab-content">
                    <div class="tab-pane" ng-class="{'active':'tabInfo' == currentTabId}" id="tabInfo">
                        <div class="panel panel-default">
                            <div class="panel-body table-responsive">
                                <div class="row">
                                    <div>
                                        <form class="form-horizontal" name="validForm" novalidate>
                                            <div class="panel-default">
                                                <div class="panel-footer" style="text-align: right;">
                                                    <h3 class="panel-title" style="float: left;"><strong>{{'当前页面的操作' | dyLanguage}}</strong></h3>
                                                    <button class="btn btn-info" ng-click="saveCourse()"><i class="fa"></i>{{'保存' | dyLanguage}}</button>

                                                    <button class="btn btn-info" ng-click="returnMap()"><i class="fa"></i>{{'返回' | dyLanguage}}</button>
                                                </div>
                                                <div class="panel-body panel-dialog">
                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'主图' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="profile-image">
                                                                <img style="min-height: 50px;min-width: 100px;max-width: 200px;max-height: 100px;" ng-src="{{learningMapCourseDetail.picture | faceUrl}}" ngf-select
                                                                     ngf-change="uploadCourseImage($files)" ngf-pattern="'image/*'" ngf-accept="'image/*'"
                                                                     ngf-max-size="20MB" ngf-min-height="100" ngf-resize="{width: 1000, height: 1000}" style="cursor: pointer"/>
                                                            </div>
                                                            <span class="help-block">{{'请上传图片' | dyLanguage}}<i style="cursor: pointer; "><span ng-show="showPictureProgress">({{pictureProgress.value}}%)</span></i></span>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'名称' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="input-group">
                                                                <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                                <input type="text" class="form-control" name="name" ng-model="learningMapCourseDetail.name" required/>
                                                            </div>
                                                            <span class="help-block" ng-show="(validForm.name.$untouched && !validForm.$submitted) || validForm.name.$valid">{{'请输入学习地图的名称' | dyLanguage}}</span>

                                                            <div ng-show="(validForm.name.$touched || validForm.$submitted ) && validForm.name.$invalid">
                                                                <span class="error-block" ng-show="validForm.name.$error.required">{{'必须要输入学习地图的名称' | dyLanguage}}</span>
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'描述' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <textarea class="form-control" rows="5" ng-model="learningMapCourseDetail.remark"></textarea>
                                                            <span class="help-block">{{'请输入学习地图的描述' | dyLanguage}}</span>
                                                        </div>
                                                    </div>

                                                    <div class="form-group">
                                                        <label class="col-md-3 col-xs-12 control-label">{{'课程序号' | dyLanguage}}</label>

                                                        <div class="col-md-6 col-xs-12">
                                                            <div class="input-group">
                                                                <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                                                <input type="number" class="form-control" name="sort" ng-model="learningMapCourseDetail.sort" required/>
                                                            </div>
                                                            <span class="help-block" ng-show="(validForm.sort.$untouched && !validForm.$submitted) || validForm.sort.$valid">{{'课程序号' | dyLanguage}}</span>

                                                            <div ng-show="(validForm.sort.$touched || validForm.$submitted ) && validForm.sort.$invalid">
                                                                <span class="error-block" ng-show="validForm.sort.$error.required">{{'必输选项' | dyLanguage}}</span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel-body tab-content">
                    <div class="tab-pane" ng-class="{'active':'tabExercise' == currentTabId}" id="tabExercise">
                        <div class="panel panel-default">
                            <div class="panel-body table-responsive">
                                <div>
                                    <div class="panel-footer" style="text-align: right;">
                                        <h3 class="panel-title" style="float: left;"><strong>{{'当前页面的操作' | dyLanguage}}</strong></h3>
                                        <!--<button class="btn btn-info" ng-click="addExercise('H5', 'H5')"><i class="fa fa-plus"></i>{{'新增网页科目' | dyLanguage}}</button>-->
                                        <!--<button class="btn btn-info" ng-click="addExercise('H5', 'VIDEO')"><i class="fa fa-plus"></i>{{'新增视频科目' | dyLanguage}}</button>-->
                                        <!--<button class="btn btn-info" ng-click="addExercise('QUIZ')"><i class="fa fa-plus"></i>{{'新增测试科目' | dyLanguage}}</button>-->
                                        <button class="btn btn-info" ng-click="configExercise()"><i class="fa fa-plus"></i>{{'新增' | dyLanguage}}</button>
                                        <!--<button class="btn btn-info" ng-click="loadExercise()"><i class="fa fa-times"></i>{{'刷新科目' | dyLanguage}}</button>-->
                                        <button class="btn btn-info" ng-click="returnMap()"><i class="fa"></i>{{'返回' | dyLanguage}}</button>
                                    </div>
                                    <div class="panel-body table-responsive">
                                        <table class="table table-striped table-bordered">
                                            <thead>
                                            <tr>
                                                <th>{{'名称' | dyLanguage}}</th>
                                                <th>{{'序号' | dyLanguage}}</th>
                                                <th>{{'类型' | dyLanguage}}</th>
                                                <th class="optionTh"></th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr ng-repeat="exercise in exercises | orderBy:['sort']" title="{{}}">
                                                <td>{{exercise.name}}</td>
                                                <!--<td>{{exercise.id}}</td>-->
                                                <td><span style="cursor: pointer" class="fa fa-plus-circle" ng-click="upExerciseSort(exercise)"></span> &nbsp; {{exercise.sort}} &nbsp; <span style="cursor: pointer" class="fa fa-minus-circle"
                                                                                                                                                                                              ng-click="downExerciseSort(exercise)"></span> &nbsp; <a
                                                        href="javascript:void(0)" ng-click="saveCurrentExercise(exercise)" ng-show="exercise.needSave">{{'保存' | dyLanguage}}</a></td>
                                                <td>{{exercise.type | EnumFilter:EnumName.LearningMapExerciseStatusEnum}}</td>
                                                <td>
                                                    <a href="javascript:void(0)" ng-click="removeExercise(exercise)">{{'移除' | dyLanguage}}</a>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- END PAGE CONTENT WRAPPER -->
</div>
